package com.waa.gulimall.cart.service;

import com.waa.gulimall.cart.vo.Cart;
import com.waa.gulimall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;

    Cart getCart() throws ExecutionException, InterruptedException;
    //清空购物车
    public void  clearCart(String cartKey);

    void checkItem(Long skuId, Integer checked);

    /**
     * 修改购物项数量
     * @param skuId
     * @param count
     */
    void updateItem(Long skuId, Integer count);

    void deleteItem(Long skuId);

    List<CartItem> getUserCartItems();
}
